/***
 * typeof
 *  * 返回数据类型，包含这7种：
 *  * number、boolean、symbol、string、object、undefined、function
 *  * * null array object Date 的结果为object
 *  * * function 的结果为 function
 *  
 */

// null
let kong = null           
console.log(typeof kong, typeof null); //object object

//array
let arr = []
console.log(typeof arr, typeof []);  //object

//Date
let date = new Date()
console.log(date, typeof date); //2021-08-14T05:15:36.952Z object

// new RegExp()
let g = new RegExp()
console.log(g, typeof g);  ///(?:)/ object

// function
let func = ()=>{}  
console.log(typeof func);  //function
function test(){}
console.log(typeof test);  //function

// new Boolean
let c = new Boolean()
console.log(c, typeof c);  //[Boolean: false] object

// new String
let d = new String('ddd')
console.log(d, typeof d);  //[String: 'ddd']  object

// new Number
let e = new Number(2)
console.log(e, typeof e);  //[Number: 2] object

//undefined
let a
console.log(a, typeof a); //undefined undefined

// boolean
let d = true
console.log(typeof d);  //boolean

// symbol
let f = Symbol('ff')
console.log(f, typeof f);  //Symbol(ff) symbol
